<?php

/*
 * author : wiloke
 * author uri: wiloke.com
 * date: 04/26/2014
 * time: 07 aggregate_methods(object, class_name)
 */

$aOurClients = get_post_meta($post->ID, $post->post_type, true);

$aOurClients = isset($aOurClients['ourclient']) ? $aOurClients['ourclient'] : null;

$logo = QVA_ADMIN_IMG_URI . 'no-img_150x150.jpg';
$aOurClients = wp_parse_args( $aOurClients, array( 'logo'=>array($logo), 'link' =>array('#'), 'photo'=>array($logo), 'name'=>array(' '), 'position'=>array(' '), 'testimonial'=>array(' ') ));
?>



    <div class="bt-reset">
        <div class="container-12-fluid">
            <div class="container-12-row">
                <?php foreach ($aOurClients['testimonial'] as $k => $v) : ?>
                <div class="clone-me wrap-delete large-4">
                    <div class="panel">
                        <div class="panel-heading">
                            <div class="panel-title"> &nbsp; </div>
                            <div class="panel-options">
                                <a href="#" class="delele-this"><i class="fa fa-times"></i></a>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="form-group">
                                <input type="hidden" class="reset" name="ourclient[photo][]" value="<?php echo $aOurClients['photo'][$k] ?>">
                                <a href="#" class="upload-image singular_upload">
                                    <div class="lux-gallery logo">
                                        <img class="image_placeholder" alt="our clients" src="<?php echo $aOurClients['photo'][$k] ?>">
                                    </div>
                                </a>
                            </div>
                            <div class="form-group">
                                <label class="form-label">Name</label>
                                <div class="controls">
                                    <input type="text" class="reset form-control" value="<?php echo !empty($aOurClients['name'][$k]) ? stripslashes($aOurClients['name'][$k]) : ''; ?>" name="ourclient[name][]" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="form-label">Position</label>
                                <div class="controls">
                                    <input type="text" class="reset form-control" value="<?php echo !empty($aOurClients['position'][$k]) ? stripslashes($aOurClients['position'][$k]) : ''; ?>" name="ourclient[position][]" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="form-label">Testimonial</label>
                                <div class="controls">
                                    <textarea class="reset form-control" name="ourclient[testimonial][]" class="form-control" placeholder=""><?php echo !empty($v) ? $v : ''; ?></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <?php endforeach; ?>
                <div class="bo-add-new wo-wrapclone">
                    <div class="">
                        <button class="btn btn-blue aboutus wo-addmore" type="button">Add More</button>
                    </div>
                </div>
            </div>
        </div>
    </div>



